package com.example.demo.web.api

import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.annotation.Bean
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import org.springframework.web.client.RestTemplate

@RestController
@RequestMapping("/ingredients")
class IngredientController @Autowired constructor(
        private val rest: RestTemplate
){

    @Bean
    fun resetTemplate() : RestTemplate {
        return RestTemplate()
    }

    @GetMapping("/{id}")
    fun getIngredientById(@PathVariable id: Long) {
//        rest.
    }

}